<%@ page import="top.jiaman.javaweb.entity.User" %>
<%@ page import="top.jiaman.javaweb.dao.UserDao" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <link rel="stylesheet" href="static/layui/css/layui.css">
</head>
<body>
<div class="layui-container">
    <blockquote class="layui-elem-quote layui-text">
        user数据渲染：
    </blockquote>

    <%
        String id = request.getParameter("id");
        User user = UserDao.getUserById(id);
    %>

    <form class="layui-form" action="" >

        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">姓名：</label>
                <div class="layui-input-inline">
                    <label>
                        <input type="tel" name="tel" class="layui-input" value="<%=user == null ? "null" : user.getName()%>" >
                    </label>
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">地址：</label>
                <div class="layui-input-inline">
                    <label>
                        <input type="text" name="email"  class="layui-input" value="<%=user == null ? "null" : user.getAddress()%>" >
                    </label>
                </div>
            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-input-block">
                <button type="submit" class="layui-btn" >立即提交</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>

    </form>

</div>
<script src="static/layui/layui.all.js"></script>
</body>
</html>
